<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="${website}resource/admin/css/admin.css" type="text/css" />
<script type="text/javascript" src="${website}resource/js/common_min.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		//初始化cityName；
		$("#cityName").attr("value",$("#cityId").find('option:selected').text());
		//城市下拉框值改变时，cityName相应改变
		$("#cityId").change(function(){
			$("#cityName").attr("value",$("#cityId").find('option:selected').text());
		});
	});
</script>
<title>Insert title here</title>
</head>
<body>
	<form action="${website}admin/city_addCityTourismOrg.action" method="post">
		<table>
			<tr>
				<td>城市名称</td>
				<td><select name="tourismOrg.cityId" id="cityId">
						<c:forEach items="${cityItems}" var="cityItem">
						<option value="${cityItem.cityId}">${cityItem.cityName}</option>
						</c:forEach>
					</select>
					<input type="hidden" id="cityName" name="tourismOrg.cityName" />
				</td>
				<td>类型</td>
				<td><input type="radio" value="true" name="tourismOrg.type" />市内  <input type="radio" value="false" name="tourismOrg.type" />区县</td>
			</tr>
			<tr>
				<td>机构名称 </td>
				<td><input type="text" name="tourismOrg.name" /></td>
				<td>所属地区</td>
				<td><input type="text" name="tourismOrg.area" /></td>
			</tr>
			<tr>
				<td>邮编</td>
				<td> <input type="text" name="tourismOrg.postcode" /> </td>
				<td>电话</td>
				<td> <input type="text" name="tourismOrg.telephone" /></td>
			</tr>
			<tr>
				<td>地址</td>
				<td colspan="3"><input type="text" name="tourismOrg.address" /></td>
			</tr>
			<tr>
				<td colspan="4"> <input type="submit" value="提交" /></td>
			</tr>
		</table>
	</form>
</body>
</html>